<template>
  <div>
    <el-breadcrumb separator-class="el-icon-arrow-right">
        <el-breadcrumb-item :to="{ path: '/start' }">首页</el-breadcrumb-item>
        <el-breadcrumb-item>排行榜</el-breadcrumb-item>
        <el-breadcrumb-item>评论数top10</el-breadcrumb-item></el-breadcrumb>
    <el-table :data="rep" border style="width: 100%;height:450px;overflow:auto;">
    <el-table-column type="index"></el-table-column>
    <el-table-column label="微博内容" prop="context" width="650">
    </el-table-column>
    <el-table-column label="发布时间" prop="time" width="150">
    </el-table-column>
    <el-table-column label="评论数" prop="pinglun" width="100">
    </el-table-column>
     <el-table-column label="微博链接" width="130" show-overflow-tooltip>
    <template slot-scope="scope">
    <a :href="scope.row.url" target="_blank" class="buttonText">正文链接</a>
    </template>
    </el-table-column>
    </el-table></div>
</template>

<script>
import axios from 'axios'
export default {
  name: 'Reply',
  data () {
    return {
      rep:[]

    }
  },
  methods: {
    getReply () {
      const path = `http://127.0.0.1:5000/reply`
      axios.get(path)
        .then(response => {
          // alert(response.data.config)
            // alert (response.data.rep)
          this.rep = response.data.rep
        })
        .catch(error => {
          console.log(error)
        })
    }
  },

  created () {
  
    this.getReply()
  }
}
</script>

<style>

</style>
